package com.tsd.base.dao;

import com.tsd.base.entity.BaseCodeRuleItem;
import com.tsd.base.entity.BaseCodeRuleItemExt;
import com.tsd.common.vo.BatchDeleteLogicVo;
import com.tsd.core.vo.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：BaseCodeRuleItemMapper
 *
 * @author zsy
 * @date 2020/12/29 15:22:59
 */
public interface BaseCodeRuleItemMapper {

    BaseCodeRuleItem selectByPrimaryKey(Long id);

    BaseCodeRuleItemExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(BaseCodeRuleItem record);

    int insertSelective(BaseCodeRuleItem record);

    int updateByPrimaryKey(BaseCodeRuleItem record);

    int updateByPrimaryKeySelective(BaseCodeRuleItem record);

    List<BaseCodeRuleItemExt> selectByEntity(BaseCodeRuleItem record);

    List<BaseCodeRuleItemExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BaseCodeRuleItemExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BaseCodeRuleItemExt> selectByParams(@Param("params") Map<String, Object> params);

    /**
     * 获取编码规则明细根据code_rule_sid
     *
     * @param code_rule_sid
     * @return
     */
    List<BaseCodeRuleItemExt> findByCodeRuleSid(String code_rule_sid);

    int deleteLogicByIdList(BatchDeleteLogicVo logicVo);
}
